<template>
    <view>
        <view class="" style="position: relative;">
            <image src="http://yanxuan.nosdn.127.net/8976116db321744084774643a933c5ce.png" mode=""
                style="width: 750rpx;height: 500rpx;"></image>
            <view class="tuango">
                团购列表
            </view>
        </view>
        <view style="margin-top: 40rpx;">
            <view style="width: 95%;margin: auto;">
                <view v-for="(item,index) in from" :key="index">
                    <view class="x" style="padding-top: 10rpx;background: #ffffff;margin-top: 15rpx;">
                        <!-- 商品图片 -->
                        <view>
                            <img :src="item.picUrl" style="width: 200rpx;height: 180rpx;" />
                        </view>
                        <!-- 商品-名称/介绍/拼团/满减/价格 -->
                        <view style="margin-left: 30rpx;">
                            <view>{{item.name}}</view> <!-- 名称 -->
                            <view>{{item.brief}}</view> <!-- 介绍 -->
                            <view style="font-size: 25rpx;">
                                <span style="border: blue solid 3rpx;color: blue;">{{item.grouponMember}}人成团</span>
                                <span style="border: red solid 3rpx; color: red;">{{item.grouponDiscount}}元再减</span>
                            </view>
                            <view style="font-size: 29rpx;margin-top: 20rpx;">
                                <span style="">￥{{item.grouponDiscount}}.00</span> <!-- 现价 -->
                                <span style="margin-left: 10rpx;text-decoration: line-through;font-size: 25rpx;
                                color: darkgrey;"> <!-- 原价 -->
                                    {{item.grouponDiscount}}
                                </span>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="myl spcz">
            <p>没有更多了</p>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                from: []
            }
        },
        onLoad() {
            uni.request({
                url: "http://47.91.230.137:8086/wx/groupon/list",
                success: (res) => {
                    console.log(res)
                    this.from = res.data.data.list
                }
            })
        },
        methods: {
            xiangqingye() {

            }
        }
    }
</script>

<style>
    html {
        background: #f1f1f1;
    }

    .tuango {
        position: absolute;
        bottom: 280rpx;
        left: 230rpx;
        font-size: 80rpx;
        color: #ffffff;
    }

    .myl {
        color: #999999;
        padding-top: 50rpx;
    }
</style>